package homework;

public class Homework6 {
	public static void main(String[] args) {
		for (int i = 1; i <= 5; i++) {
			// 循环打印空格
			for (int j = 0; j < 5 - i; j++) {
				System.out.print(" ");
			}
			// 循环输出*
			for (int j = 1; j <= i*2-1; j++) {
				if (j == 1 || j == i * 2 -1) {
					System.out.print("*");
				}else {
					System.out.print(" ");
				}
			}
			System.out.println();
		}
	}
}
